package com.doeis.uwork.entity;

import java.net.URLDecoder;
import java.sql.Timestamp;

import com.doeis.common.utils.StringUtils;
import com.voland.core.annotation.Associate;
import com.voland.core.annotation.Table;
import com.voland.core.db.Entity;
import com.voland.core.validator.NotNull;

/****
 * 心得评论
 * ***/
@Table(name="item_note_comment")
public class ItemNoteComment extends Entity {

	private String id;
	@NotNull(message="指数心得不能为空")
	private String item_note_id;
	@NotNull(message="用户Id不能为空")
	private String user_id; //评论发送者
	private String reply_id;//回复某个人，直接评论这个字段是空
	@NotNull(message="评论内容不能为空")
	private String content;
	private Timestamp creater_at;
	private String designate;
	
	@Associate
	private String head_url;//评论发送者 头像
	@Associate
	private String user_name;//评论发送者 name
	@Associate
	private String reply_name;//回复者 name
	@Associate
	private String item_id;//指数id
	@Associate
	private String item_name;
	@Associate
	private String shareid;
	@Associate
	private boolean textItem;
	@Associate
	private String note_content;
	@Associate 
	private String note_img;
	@Associate
	private String creator;//指数心得创建人
	@Associate
	private String belong_to;
	
	public String getDesignate() {
		return designate;
	}
	public void setDesignate(String designate) {
		this.designate = designate;
	}
	public String getBelong_to() {
		return belong_to;
	}
	public void setBelong_to(String belong_to) {
		this.belong_to = belong_to;
	}
	public String getCreator() {
		return creator;
	}
	public void setCreator(String creator) {
		this.creator = creator;
	}
	public String getNote_content() {
		return note_content;
	}
	public void setNote_content(String note_content) {
		this.note_content = note_content;
	}
	public String getNote_img() {
		return note_img;
	}
	public void setNote_img(String note_img) {
		this.note_img = note_img;
	}
	public String getItem_id() {
		return item_id;
	}
	public void setItem_id(String item_id) {
		this.item_id = item_id;
	}
	public String getItem_name() {
		return item_name;
	}
	public void setItem_name(String item_name) {
		this.item_name = item_name;
	}
	public String getShareid() {
		return shareid;
	}
	public void setShareid(String shareid) {
		this.shareid = shareid;
	}
	public boolean isTextItem() {
		return textItem;
	}
	public void setTextItem(boolean textItem) {
		this.textItem = textItem;
	}
	public String getReply_name() {
		return reply_name;
	}
	public void setReply_name(String reply_name) {
		this.reply_name = reply_name;
	}
	public String getUser_name() {
		return user_name;
	}
	public void setUser_name(String user_name) {
		this.user_name = user_name;
	}
	public String getHead_url() {
		return head_url;
	}
	public void setHead_url(String head_url) {
		this.head_url = head_url;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getItem_note_id() {
		return item_note_id;
	}
	public void setItem_note_id(String item_note_id) {
		this.item_note_id = item_note_id;
	}
	public String getUser_id() {
		return user_id;
	}
	public void setUser_id(String user_id) {
		this.user_id = user_id;
	}
	public String getReply_id() {
		return reply_id;
	}
	public void setReply_id(String reply_id) {
		this.reply_id = reply_id;
	}
	public String getContent() {
		if (!StringUtils.isBlank(content)) {
			try {
				content = URLDecoder.decode(content, "UTF-8");
			} catch (Exception e) {
				//content="";
			}
		}
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Timestamp getCreater_at() {
		return creater_at;
	}
	public void setCreater_at(Timestamp creater_at) {
		this.creater_at = creater_at;
	}
	
	
	
	
	
	
}